<template>
  <view style="padding-top: 100rpx;">
    <view class="text-area">
      <text>输入值:</text>
      <input type="text" v-model="title" style="color: red;" />
    </view>
    <view class="text-area" style="margin-top: 30rpx;">
      <text>回传值:</text>
      <input type="text" :value="callBackValue" style="color: brown;" />
    </view>
    <comA :intent="title" style="margin-top: 50rpx;" />
    <comB @callBackFun="callBack" style="margin-top: 50rpx;" />
  </view>
</template>

<script>
import comA from '../../components/compA.vue'
import comB from '../../components/compB.vue'

export default {
  components: { comA, comB },
  data() {
    return {
      title: '',
      callBackValue: ''
    }
  },
  methods: {
    callBack(msg) {
      console.warn("---IntentPage---callBack-->" + msg);
      this.callBackValue = msg;
    }
  }
}
</script>

<style scoped>
.text-area {
  display: flex;
  align-items: center;
  padding: 0 30rpx;
}
input {
  flex: 1;
  border: 1px solid #eee;
  padding: 15rpx;
  border-radius: 8rpx;
}
</style>